package com.pjh.shitang.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pjh.shitang.entitys.Reply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author yueyinghaibao
 * @date 2022/5/6
 */
@Mapper
@Repository
public interface ReplyMapper extends BaseMapper<Reply> {
    @Update("update db_reply set likes = likes + #{count} where rid = #{rid}")
    public int update(@Param("count") Integer count, @Param("rid") Integer rid);
}
